package com.jshoperxms.controller.utils.enums;

/**
 * Created by sdywcd on 17/2/5.
 * Des:
 */
public class OrderEnums {
    /**
     * 在发货地址中是否已经发货
     *
     * @author sdywcd
     *
     */
    public enum ShippingIsSend {
        SHIPPING_HAVESEND("已发货", "1"), SHIPPING_UNSEND("未发货", "0");
        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private ShippingIsSend(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String tag) {
            for (ShippingIsSend d : ShippingIsSend.values()) {
                if (d.getState().equals(tag)) {
                    return d.getName();
                }
            }
            return "";
        }
    }



    /**
     * 发货地址是否绑定了订单
     *
     * @author sdywcd
     *
     */
    public enum ShippingInOrder {
        SHIPPING_BIND_ORDER("发货地址已经绑定订单", "1"), SHIPPING_UNBIND_ORDER("发货地址未绑定订单", "0"), SHIPPING_BIND_OLD_ORDER("发货地址绑定订单但已经失效", "2");
        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private ShippingInOrder(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String tag) {
            for (ShippingInOrder d : ShippingInOrder.values()) {
                if (d.getState().equals(tag)) {
                    return d.getName();
                }
            }
            return "";
        }
    }

    /**
     * 订单配送方式
     *
     * @ClassName: OrderDeliverMode
     * @Description: TODO(这里用一句话描述这个类的作用)
     * @author jcchen
     * @date 2015年2月17日 下午11:10:28
     *
     */
    public enum OrderDeliverMode {
        ORDERDELIVERMODE_EXPRESS("快递", "EXPRESS"), ORDERDELIVERMODE_POST("平邮", "POST"), ORDERDELIVERMODE_EMS("EMS", "EMS");

        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private OrderDeliverMode(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String state) {
            for (OrderDeliverMode orderstate : OrderDeliverMode.values()) {
                if (orderstate.getState().equals(state)) {
                    return orderstate.getName();
                }
            }
            return "";
        }
    }

    /*
    自定义收获时间
     */
    public enum OrderCustomerDeliverTime {
        YES("是", "1"), NO("否", "0");

        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private OrderCustomerDeliverTime(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String state) {
            for (OrderCustomerDeliverTime orderstate : OrderCustomerDeliverTime.values()) {
                if (orderstate.getState().equals(state)) {
                    return orderstate.getName();
                }
            }
            return "";
        }
    }

    /**
     * 是否需要开票
     *
     * @ClassName: IsneedInvoice
     * @Description: TODO(这里用一句话描述这个类的作用)
     * @author jcchen
     * @date 2015年3月6日 下午10:42:19
     *
     */
    public enum IsneedInvoice {
        YES("需要开票", "1"), NO("不开票", "0");

        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private IsneedInvoice(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String tag) {
            for (IsneedInvoice d : IsneedInvoice.values()) {
                if (d.getState().equals(tag)) {
                    return d.getName();
                }
            }
            return "";
        }
    }

    /**
     * 快递单打印状态
     *
     * @author sdywcd
     *
     */
    public enum PrintExpressStatus {
        EXPRESS_NOT_PRINT_ZERO_NUM("未打印", "0"), EXPRESS_HAVE_PRINT_ONE_NUM("已打印", "1");
        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private PrintExpressStatus(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String tag) {
            for (PrintExpressStatus d : PrintExpressStatus.values()) {
                if (d.getState().equals(tag)) {
                    return d.getName();
                }
            }
            return "";
        }
    }

    /**
     * 发货地址是否和收获地址绑定
     *
     * @author sdywcd
     *
     */
    public enum ShippingHaveDeliverAddress {
        SHIPPING_HAVE_DA_ONE_NUM("发货地址有对应收获地址", "1"), SHIPPING_UNHAVE_DA_ZERO_NUM("发货地址没有对应收获地址", "0");
        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private ShippingHaveDeliverAddress(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String tag) {
            for (ShippingHaveDeliverAddress d : ShippingHaveDeliverAddress.values()) {
                if (d.getState().equals(tag)) {
                    return d.getName();
                }
            }
            return "";
        }
    }

    /**
     * 是否打印了发货单
     *
     * @ClassName: PrintInvoiceState
     * @Description: TODO(这里用一句话描述这个类的作用)
     * @author jcchen
     * @date 2015年3月6日 下午10:42:19
     *
     */
    public enum PrintInvoiceStatus {
        INVOICE_NOT_PRINT_ZERO_NUM("未打印", "0"), INVOICE_HAVE_PRINT_ZERO_NUM("已打印", "1");

        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private PrintInvoiceStatus(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String tag) {
            for (PrintInvoiceStatus d : PrintInvoiceStatus.values()) {
                if (d.getState().equals(tag)) {
                    return d.getName();
                }
            }
            return "";
        }
    }

    /**
     * 是否打印发票
     *
     * @ClassName: PrintInvoiceState
     * @Description: TODO(这里用一句话描述这个类的作用)
     * @author jcchen
     * @date 2015年3月6日 下午10:42:19
     *
     */
    public enum PrintFaPiaoInvoiceStatus {
        FAPIAOINVOICE_NOT_PRINT_ZERO_NUM("未打印", "0"), FAPIAOINVOICE_HAVE_PRINT_ZERO_NUM("已打印", "1");

        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private PrintFaPiaoInvoiceStatus(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String tag) {
            for (PrintFaPiaoInvoiceStatus d : PrintFaPiaoInvoiceStatus.values()) {
                if (d.getState().equals(tag)) {
                    return d.getName();
                }
            }
            return "";
        }
    }

    /**
     * 订单状态
     *
     * @ClassName: OrderState
     * @Description: TODO(这里用一句话描述这个类的作用)
     * @author jcchen
     * @date 2015年2月17日 下午11:10:28
     *
     */
    public enum OrderStatus {
        ORDERSTATE_UNCONFIRMED_ZERO_NUM("未确认", "0"), ORDERSTATE_CONFIRMED_ONE_NUM("已确认", "1"), ORDERSTATE_PAYMENT_AFTER_ARRIVAL_OF_GOODS_TWO_NUM("货到付款", "2"), ORDERSTATE_WAIT_CONFIRM_RECEIVE_THREE_NUM("待确认收货", "3"), ORDERSTATE_RETURN_GOODS_FOUR_NUM("退货", "4"), ORDERSTATE_CLOSE_FIVE_NUM(
                "订单关闭", "5"), ORDERSTATE_MEMBER_HAVE_REVEIVE_GOODS_SIX_NUM("用户已收货", "6"), ORDERSTATE_OUT_OF_STACK_SEVEN_NUM("缺货", "7"), ORDERSTATE_MEMBER_DELETE_EIGHT_NUM("用户删除", "8"), ORDERSTATE_SUCCESS_NINE_NUM("成功", "9"),ORDERSTATE_REPLACE_GOODS_TEN_NUM("换货","10");

        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private OrderStatus(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String state) {
            for (OrderStatus orderstate : OrderStatus.values()) {
                if (orderstate.getState().equals(state)) {
                    return orderstate.getName();
                }
            }
            return "";
        }
    }


    /**
     * 订单创建类型标记
     *
     * @author sdywcd
     *
     */
    public enum OrderCreateTag {
        ORDERTAG_NORMAL_ONE_NUM("普通订单", "1"), ORDERTAG_GROUPON_TWO_NUM("团购订单", "2"), ORDERTAG_AUCTION_THREE_NUM("拍卖订单", "3"), ORDERTAG_MOBILE_FOUR_NUM("手机订单", "4"), ORDERTAG_GROUP_GOODS_FIVE_NUM("组合商品订单", "5");
        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private OrderCreateTag(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String tag) {
            for (OrderCreateTag d : OrderCreateTag.values()) {
                if (d.getState().equals(tag)) {
                    return d.getName();
                }
            }
            return "";
        }
    }

    /**
     * 订单支付状态
     *
     * @ClassName: OrderPayState
     * @Description: TODO(这里用一句话描述这个类的作用)
     * @author jcchen
     * @date 2015年2月17日 下午11:10:28
     *
     */
    public enum OrderPayState {
        ORDERPAYSTATE_UNPAY_ZERO_NUM("未付款", "0"), ORDERPAYSTATE_HAVEPAY_ONE_NUM("已付款", "1"), ORDERPAYSTATE_CLOSE_TWO_NUM("订单关闭", "2");

        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private OrderPayState(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String state) {
            for (OrderPayState orderstate : OrderPayState.values()) {
                if (orderstate.getState().equals(state)) {
                    return orderstate.getName();
                }
            }
            return "";
        }
    }



    /**
     * 订单配送状态
     *
     * @ClassName: OrderShippingState
     * @Description: TODO(这里用一句话描述这个类的作用)
     * @author jcchen
     * @date 2015年2月17日 下午11:10:28
     *
     */
    public enum OrderShippingState {
        ORDERSHIPPINGSTATE_UNDELIVER_GOODS_ZERO_NUM("配货中(未发货)", "0"), ORDERSHIPPINGSTATE_HAVE_DELIVER_GOODS_ONE_NUM("已发货", "1"), ORDERSHIPPINGSTATE_CLOSE_TWO_NUM("订单关闭", "2");

        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private OrderShippingState(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String state) {
            for (OrderShippingState orderstate : OrderShippingState.values()) {
                if (orderstate.getState().equals(state)) {
                    return orderstate.getName();
                }
            }
            return "";
        }
    }


    /**
     * 订单退货类型
     */
    public enum OrderReturnType {
        RT("退货", "1"), RP("换货", "2");

        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private OrderReturnType(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String state) {
            for (OrderReturnType orderstate : OrderReturnType.values()) {
                if (orderstate.getState().equals(state)) {
                    return orderstate.getName();
                }
            }
            return "";
        }
    }


    /**
     * 订单退货进度状态
     */
    public enum OrderReturnTypeStatus {
        RTING("退换货中", "1"), RPRECEIVE("已收到货物", "2"),RPOCESSING("退换货处理中","3"),RPSUCCESS("退换货成功","4");

        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private OrderReturnTypeStatus(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String state) {
            for (OrderReturnTypeStatus orderstate : OrderReturnTypeStatus.values()) {
                if (orderstate.getState().equals(state)) {
                    return orderstate.getName();
                }
            }
            return "";
        }
    }


}
